Adwaita: added active state to the switch slider
authorLapo Calamandrei <calamandrei@gmail.com>
Tue, 24 Jun 2014 08:38:03 +0000 (10:38 +0200)
committerLapo Calamandrei <calamandrei@gmail.com>
Tue, 24 Jun 2014 08:38:03 +0000 (10:38 +0200)
gtk/resources/theme/Adwaita/_common.scss
gtk/resources/theme/Adwaita/gtk-contained-dark.css
gtk/resources/theme/Adwaita/gtk-contained.css

index 35c2ac11de4419151bc5fb1e243fc34361564a5c..b60b9c9bd227b6a527e5ab78412da890579ca897 100644 (file)
@@ -1159,6 +1159,13 @@ GtkSwitch {
                                  transparentize(white,0.85)),
                   inset 0 -2px transparentize($bg_color,0.4),
                   inset 0 -1px mix($bg_color,$borders_color,50%);
+      &:hover {
+        @include button(hover, $noedge: true);
+        box-shadow: inset 0 1px if($variant=='light', white,
+                                   transparentize(white,0.85)),
+                    inset 0 -2px transparentize($bg_color,0.4),
+                    inset 0 -1px mix($bg_color,$borders_color,50%);
+      }
       &:active { border: 1px solid $selected_borders_color; }
       &:insensitive { @include button(insensitive, $noedge: true); }
       &:backdrop { @include button(backdrop); }
index dc1e65a04a670f2f2a54a4a221b29629ec4b52aa..10be433142425ef84213c193df4c1450fb317997 100644 (file)
@@ -1321,6 +1321,16 @@ GtkSwitch {
     icon-shadow: 0 -1px rgba(0, 0, 0, 0.81176);
     box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
     box-shadow: inset 0 1px rgba(255, 255, 255, 0.15), inset 0 -2px rgba(57, 63, 63, 0.6), inset 0 -1px #2a2f2f; }
+    GtkSwitch.slider:hover {
+      border-width: 1px;
+      border-style: solid;
+      color: #eeeeec;
+      border-color: #1c1f1f;
+      background-image: linear-gradient(to bottom, #5b6464, #434a4a 40%, #393f3f);
+      text-shadow: 0 -1px rgba(0, 0, 0, 0.77976);
+      icon-shadow: 0 -1px rgba(0, 0, 0, 0.77976);
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0.15), inset 0 -2px rgba(57, 63, 63, 0.6), inset 0 -1px #2a2f2f; }
     GtkSwitch.slider:active {
       border: 1px solid #0f2b48; }
     GtkSwitch.slider:insensitive {
index 8df98e0e5c51fc26cff8850e3fb4edf936b58bd4..564ed3b08d5900fc9766a1ccbe07f0a719469209 100644 (file)
@@ -1321,6 +1321,16 @@ GtkSwitch {
     icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
     box-shadow: inset 0 1px white;
     box-shadow: inset 0 1px white, inset 0 -2px rgba(237, 237, 237, 0.6), inset 0 -1px #c7c7c7; }
+    GtkSwitch.slider:hover {
+      border-width: 1px;
+      border-style: solid;
+      color: #2e3436;
+      border-color: #a1a1a1;
+      background-image: linear-gradient(to bottom, white, #f7f7f7 40%, #ededed);
+      text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
+      icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
+      box-shadow: inset 0 1px white;
+      box-shadow: inset 0 1px white, inset 0 -2px rgba(237, 237, 237, 0.6), inset 0 -1px #c7c7c7; }
     GtkSwitch.slider:active {
       border: 1px solid #184472; }
     GtkSwitch.slider:insensitive {